<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="es.ats.codington.festival.domain.Place"%>


<!DOCTYPE html>
<html>
  <head>
    <title>UpdatePlacesAdmin</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="css/estilo.css">
    <script type="text/javascript" src="js/javascript.js"></script>

  </head>
 
  <body>

    <div class="cabecera"> 
      <h1 align="center">FESTIVAL REGISTRATION SYSTEM</h1>
    </div>

   	<div id="login-overlay" class="modal-dialog">
    	
 		<form action="backpersonaladmin.htm" method="GET">
  			<button type="submit" class="btn btn-info pull-right">Go to Admin Page</button>
 		</form>
 		
	</div>
   
   <div class="container">
    <div class="row">
        <div class="panel panel-primary">
      
            <div class="panel-heading">
                <h3 class="panel-title">All Events</h3>
              
            </div>
            <table class="table">
            
              <%
              Place place1=new Place();
               List<Place> placeListAll = new ArrayList<Place>();
               placeListAll = (ArrayList<Place>) session.getAttribute("placesList");
               %>

            
				<tr>
                	<thead>
					<tr>						
						<th align="left">
							Place Name
						</th>
    					<th align="left">
							Place Description
						</th>
						<th align="left">
							Place Capacity
						</th>
						<th align="left">
							Place Zone
						</th>
						
        				<th class="text-center" style="border-top: 1px solid #ffffff; border-right: 1px solid #ffffff;">
						</th>
					</tr>
				</thead>
				<tbody>
			     <%for (int i=0;i<placeListAll.size();i++) {
                        place1 = placeListAll.get(i);
			     
                  %>
			     
					<tr> 
					<form action="showplaces.htm" method="POST">
					
						<input type="hidden" name="idPlaceAdmin" value=<%=place1.getId()%>>
                        <td> <%=place1.getNamePlace()%></td>
                        <td> <%=place1.getPlaceDescription()%></td> 
						<td> <%=place1.getCapacityPlace()%></td>
                        <td> <%=place1.getZonePlace()%></td>
						<td data-name="SignUp/SignOut">
						    
						<button type="submit" class="btn btn-success btn-block">Update</button>
						   
						</td>
				    </form>
					</tr>
			     <%
                  }
                  %>
					
				</tbody>
            </table>
              
        </div>
      </div>
   </div>
 

    <div class="imgdiv">
      <img class="img">
    </div>

  </body>
</html>